package pers.amos.eshop.listener;

import pers.amos.eshop.thread.RequestProcessorThreadPool;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @author amos wong
 * @create 2020-11-14 2:57 下午
 */

/**
 * 系统初始化监听器，在该监听器中构建线程池
 *
 * @author amoswong
 */
public class InitListener implements ServletContextListener {

    /**
     * 初始化方法，初始化工作线程池和内存队列
     *
     * @param sce
     */
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        RequestProcessorThreadPool.init();
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
